package com.demo.swagger.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.demo.swagger.domain.SUserInformation;

import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;

//swagger生成接口文档api测试

@RestController
@RequestMapping("/swagger")
public class SwaggerController {

	@ApiOperation(value = "login", notes = "登陆接口", response = String.class)
	// @ApiImplicitParams(value = {
	// @ApiImplicitParam(dataType = "SUserInformation", name = "sUserInformation",
	// value = "用户信息", required = true),
	// @ApiImplicitParam(dataType = "Long", name = "number", value = "测试Long",
	// required = true) })
	@ApiResponses(value = { @ApiResponse(code = 200, message = "SUCCESS"),
			@ApiResponse(code = 400, message = "FAILURE"), @ApiResponse(code = 403, message = "Forbit"),
			@ApiResponse(code = 404, message = "No Such Accountk") })
	@RequestMapping(value = "/login", method = RequestMethod.POST)
	public SUserInformation login(SUserInformation sUserInformation) {
		System.err.println("swagger");
		System.err.println(sUserInformation);
		return sUserInformation;
	}
}
